main_sources(COMMON_SRC
    main.c

    target/common_hardware.c

    build/assert.c
    build/assert.h
    build/build_config.c
    build/build_config.h
    build/debug.c
    build/debug.h
    build/version.c
    build/version.h

    common/bitarray.c
    common/bitarray.h
    common/calibration.c
    common/calibration.h
    common/colorconversion.c
    common/colorconversion.h
    common/crc.c
    common/crc.h
    common/encoding.c
    common/encoding.h
    common/filter.c
    common/filter.h
    common/gps_conversion.c
    common/gps_conversion.h
    common/log.c
    common/log.h
    common/maths.c
    common/maths.h
    common/memory.c
    common/memory.h
    common/olc.c
    common/olc.h
    common/printf.c
    common/printf.h
    common/streambuf.c
    common/streambuf.h
    common/string_light.c
    common/string_light.h
    common/time.c
    common/time.h
    common/typeconversion.c
    common/typeconversion.h
    common/uvarint.c
    common/uvarint.h

    config/config_eeprom.c
    config/config_eeprom.h
    config/config_streamer.c
    config/config_streamer.h
    config/feature.c
    config/feature.h
    config/parameter_group.c
    config/parameter_group.h
    config/general_settings.c
    config/general_settings.h

    drivers/1-wire.c
    drivers/1-wire.h
    drivers/1-wire/ds_crc.c
    drivers/1-wire/ds_crc.h
    drivers/1-wire/ds2482.c
    drivers/1-wire/ds2482.h

    drivers/accgyro/accgyro.c
    drivers/accgyro/accgyro.h
    drivers/accgyro/accgyro_adxl345.c
    drivers/accgyro/accgyro_adxl345.h
    drivers/accgyro/accgyro_bma280.c
    drivers/accgyro/accgyro_bma280.h
    drivers/accgyro/accgyro_bmi160.c
    drivers/accgyro/accgyro_bmi160.h
    drivers/accgyro/accgyro_fake.c
    drivers/accgyro/accgyro_fake.h
    drivers/accgyro/accgyro_icm20689.c
    drivers/accgyro/accgyro_icm20689.h
    drivers/accgyro/accgyro_l3g4200d.c
    drivers/accgyro/accgyro_l3g4200d.h
    drivers/accgyro/accgyro_l3gd20.c
    drivers/accgyro/accgyro_l3gd20.h
    drivers/accgyro/accgyro_lsm303dlhc.c
    drivers/accgyro/accgyro_lsm303dlhc.h
    drivers/accgyro/accgyro_mma845x.c
    drivers/accgyro/accgyro_mma845x.h
    drivers/accgyro/accgyro_mpu.c
    drivers/accgyro/accgyro_mpu.h
    drivers/accgyro/accgyro_mpu3050.c
    drivers/accgyro/accgyro_mpu3050.h
    drivers/accgyro/accgyro_mpu6000.c
    drivers/accgyro/accgyro_mpu6000.h
    drivers/accgyro/accgyro_mpu6050.c
    drivers/accgyro/accgyro_mpu6050.h
    drivers/accgyro/accgyro_mpu6500.c
    drivers/accgyro/accgyro_mpu6500.h
    drivers/accgyro/accgyro_mpu9250.c
    drivers/accgyro/accgyro_mpu9250.h

    drivers/adc.c
    drivers/adc.h

    drivers/barometer/barometer.h
    drivers/barometer/barometer_bmp085.c
    drivers/barometer/barometer_bmp085.h
    drivers/barometer/barometer_bmp280.c
    drivers/barometer/barometer_bmp280.h
    drivers/barometer/barometer_bmp388.c
    drivers/barometer/barometer_bmp388.h
    drivers/barometer/barometer_dps310.c
    drivers/barometer/barometer_dps310.h
    drivers/barometer/barometer_fake.c
    drivers/barometer/barometer_fake.h
    drivers/barometer/barometer_lps25h.c
    drivers/barometer/barometer_lps25h.h
    drivers/barometer/barometer_ms56xx.c
    drivers/barometer/barometer_ms56xx.h
    drivers/barometer/barometer_spl06.c
    drivers/barometer/barometer_spl06.h
    drivers/barometer/barometer_msp.c
    drivers/barometer/barometer_msp.h

    drivers/buf_writer.c
    drivers/buf_writer.h
    drivers/bus.c
    drivers/bus.h
    drivers/bus_busdev_i2c.c
    drivers/bus_busdev_spi.c
    drivers/bus_i2c_soft.c

    drivers/compass/compass.h
    drivers/compass/compass_ak8963.c
    drivers/compass/compass_ak8963.h
    drivers/compass/compass_ak8975.c
    drivers/compass/compass_ak8975.h
    drivers/compass/compass_fake.c
    drivers/compass/compass_fake.h
    drivers/compass/compass_hmc5883l.c
    drivers/compass/compass_hmc5883l.h
    drivers/compass/compass_ist8308.c
    drivers/compass/compass_ist8308.h
    drivers/compass/compass_ist8310.c
    drivers/compass/compass_ist8310.h
    drivers/compass/compass_lis3mdl.c
    drivers/compass/compass_lis3mdl.h
    drivers/compass/compass_mag3110.c
    drivers/compass/compass_mag3110.h
    drivers/compass/compass_mpu9250.c
    drivers/compass/compass_mpu9250.h
    drivers/compass/compass_qmc5883l.c
    drivers/compass/compass_qmc5883l.h
    drivers/compass/compass_msp.c
    drivers/compass/compass_msp.h

    drivers/display.c
    drivers/display.h
    drivers/display_canvas.c
    drivers/display_canvas.h
    drivers/display_font_metadata.c
    drivers/display_font_metadata.h
    drivers/display_widgets.c
    drivers/display_widgets.h
    drivers/display_ug2864hsweg01.c
    drivers/display_ug2864hsweg01.h
    drivers/exti.c
    drivers/exti.h
    drivers/flash.c
    drivers/flash.h
    drivers/flash_m25p16.c
    drivers/flash_m25p16.h
    drivers/io.c
    drivers/io.h
    drivers/io_pca9685.c
    drivers/io_pca9685.h
    drivers/io_pcf8574.c
    drivers/io_pcf8574.h
    drivers/io_port_expander.c
    drivers/io_port_expander.h
    drivers/irlock.c
    drivers/irlock.h
    drivers/light_led.c
    drivers/light_led.h
    drivers/light_ws2811strip.c
    drivers/light_ws2811strip.h
    drivers/lights_io.c
    drivers/lights_io.h
    drivers/max7456.c
    drivers/max7456.h
    drivers/serial_softserial.c
    drivers/serial_softserial.h

    drivers/opflow/opflow_fake.c
    drivers/opflow/opflow_fake.h
    drivers/opflow/opflow_virtual.c
    drivers/opflow/opflow_virtual.h

    drivers/osd.c
    drivers/osd.h
    drivers/persistent.c
    drivers/persistent.h
    drivers/pitotmeter/pitotmeter_adc.c
    drivers/pitotmeter/pitotmeter_adc.h
    drivers/pitotmeter/pitotmeter_ms4525.c
    drivers/pitotmeter/pitotmeter_ms4525.h
    drivers/pitotmeter/pitotmeter_msp.c
    drivers/pitotmeter/pitotmeter_msp.h
    drivers/pitotmeter/pitotmeter_virtual.c
    drivers/pitotmeter/pitotmeter_virtual.h
    drivers/pwm_esc_detect.c
    drivers/pwm_esc_detect.h
    drivers/pwm_mapping.c
    drivers/pwm_mapping.h
    drivers/pwm_output.c
    drivers/pwm_output.h
    drivers/pinio.c
    drivers/pinio.h

    drivers/rangefinder/rangefinder_hcsr04.c
    drivers/rangefinder/rangefinder_hcsr04.h
    drivers/rangefinder/rangefinder_hcsr04_i2c.c
    drivers/rangefinder/rangefinder_hcsr04_i2c.h
    drivers/rangefinder/rangefinder_srf10.c
    drivers/rangefinder/rangefinder_srf10.h
    drivers/rangefinder/rangefinder_vl53l0x.c
    drivers/rangefinder/rangefinder_vl53l0x.h
    drivers/rangefinder/rangefinder_virtual.c
    drivers/rangefinder/rangefinder_virtual.h

    drivers/resource.c
    drivers/resource.h
    drivers/rcc.c
    drivers/rcc.h
    drivers/rx_nrf24l01.c
    drivers/rx_nrf24l01.h
    drivers/rx_pwm.c
    drivers/rx_pwm.h
    drivers/rx_spi.c
    drivers/rx_spi.h
    drivers/rx_xn297.c
    drivers/rx_xn297.h
    drivers/serial.c
    drivers/serial.h
    drivers/sound_beeper.c
    drivers/sound_beeper.h
    drivers/stack_check.c
    drivers/stack_check.h
    drivers/system.c
    drivers/system.h

    drivers/temperature/ds18b20.c
    drivers/temperature/ds18b20.h
    drivers/temperature/lm75.c
    drivers/temperature/lm75.h

    drivers/time.c
    drivers/time.h
    drivers/timer.c
    drivers/timer.h
    drivers/usb_msc.c
    drivers/usb_msc.h
    drivers/vtx_common.c
    drivers/vtx_common.h

    fc/cli.c
    fc/cli.h
    fc/config.c
    fc/config.h
    fc/controlrate_profile.c
    fc/controlrate_profile.h
    fc/fc_core.c
    fc/fc_core.h
    fc/fc_init.c
    fc/fc_init.h
    fc/fc_tasks.c
    fc/fc_tasks.h
    fc/fc_hardfaults.c
    fc/fc_msp.c
    fc/fc_msp.h
    fc/fc_msp_box.c
    fc/fc_msp_box.h
    fc/firmware_update.c
    fc/firmware_update.h
    fc/firmware_update_common.c
    fc/firmware_update_common.h
    fc/rc_smoothing.c
    fc/rc_smoothing.h
    fc/rc_adjustments.c
    fc/rc_adjustments.h
    fc/rc_controls.c
    fc/rc_controls.h
    fc/rc_curves.c
    fc/rc_curves.h
    fc/rc_modes.c
    fc/rc_modes.h
    fc/runtime_config.c
    fc/runtime_config.h
    fc/settings.c
    fc/settings.h
    fc/stats.c
    fc/stats.h

    flight/failsafe.c
    flight/failsafe.h
    flight/hil.c
    flight/hil.h
    flight/imu.c
    flight/imu.h
    flight/kalman.c
    flight/kalman.h
    flight/mixer.c
    flight/mixer.h
    flight/pid.c
    flight/pid.h
    flight/pid_autotune.c
    flight/rth_estimator.c
    flight/rth_estimator.h
    flight/servos.c
    flight/servos.h
    flight/wind_estimator.c
    flight/wind_estimator.h
    flight/gyroanalyse.c
    flight/gyroanalyse.h
    flight/rpm_filter.c
    flight/rpm_filter.h
    flight/dynamic_gyro_notch.c
    flight/dynamic_gyro_notch.h

    io/beeper.c
    io/beeper.h
    io/esc_serialshot.c
    io/esc_serialshot.h
    io/servo_sbus.c
    io/servo_sbus.h
    io/frsky_osd.c
    io/frsky_osd.h
    io/osd_dji_hd.c
    io/osd_dji_hd.h
    io/lights.c
    io/lights.h
    io/piniobox.c
    io/piniobox.h
    io/pwmdriver_i2c.c
    io/pwmdriver_i2c.h
    io/serial.c
    io/serial.h
    io/serial_4way.c
    io/serial_4way.h
    io/serial_4way_avrootloader.c
    io/serial_4way_avrootloader.h
    io/serial_4way_stk500v2.c
    io/serial_4way_stk500v2.h
    io/statusindicator.c
    io/statusindicator.h
    io/rcdevice.c
    io/rcdevice.h
    io/rcdevice_cam.c
    io/rcdevice_cam.h

    msp/msp_serial.c
    msp/msp_serial.h

    programming/logic_condition.c
    programming/logic_condition.h
    programming/global_variables.c
    programming/global_variables.h
    programming/programming_task.c
    programming/programming_task.h

    rx/crsf.c
    rx/crsf.h
    rx/eleres.c
    rx/eleres.h
    rx/fport.c
    rx/fport.h
    rx/fport2.c
    rx/fport2.h
    rx/ibus.c
    rx/ibus.h
    rx/jetiexbus.c
    rx/jetiexbus.h
    rx/msp.c
    rx/msp.h
    rx/msp_override.c
    rx/msp_override.h
    rx/nrf24_cx10.c
    rx/nrf24_cx10.h
    rx/nrf24_inav.c
    rx/nrf24_inav.h
    rx/nrf24_h8_3d.c
    rx/nrf24_h8_3d.h
    rx/nrf24_syma.c
    rx/nrf24_syma.h
    rx/nrf24_v202.c
    rx/nrf24_v202.h
    rx/pwm.c
    rx/pwm.h
    rx/frsky_crc.c
    rx/frsky_crc.h
    rx/rx.c
    rx/rx.h
    rx/rx_spi.c
    rx/rx_spi.h
    rx/sbus.c
    rx/sbus.h
    rx/sbus_channels.c
    rx/sbus_channels.h
    rx/spektrum.c
    rx/spektrum.h
    rx/srxl2.c
    rx/srxl2.h
    rx/sumd.c
    rx/sumd.h
    rx/sumh.c
    rx/sumh.h
    rx/uib_rx.c
    rx/uib_rx.h
    rx/xbus.c
    rx/xbus.h

    scheduler/scheduler.c
    scheduler/scheduler.h

    sensors/acceleration.c
    sensors/acceleration.h
    sensors/battery.c
    sensors/battery.h
    sensors/boardalignment.c
    sensors/boardalignment.h
    sensors/compass.c
    sensors/compass.h
    sensors/diagnostics.c
    sensors/diagnostics.h
    sensors/gyro.c
    sensors/gyro.h
    sensors/initialisation.c
    sensors/initialisation.h
    sensors/esc_sensor.c
    sensors/esc_sensor.h
    sensors/irlock.c
    sensors/irlock.h
    sensors/temperature.c
    sensors/temperature.h

    uav_interconnect/uav_interconnect.h
    uav_interconnect/uav_interconnect_bus.c
    uav_interconnect/uav_interconnect_rangefinder.c

    blackbox/blackbox.c
    blackbox/blackbox.h
    blackbox/blackbox_encoding.c
    blackbox/blackbox_encoding.h
    blackbox/blackbox_io.c
    blackbox/blackbox_io.h

    cms/cms.c
    cms/cms.h
    cms/cms_menu_battery.c
    cms/cms_menu_battery.h
    cms/cms_menu_blackbox.c
    cms/cms_menu_blackbox.h
    cms/cms_menu_builtin.c
    cms/cms_menu_builtin.h
    cms/cms_menu_imu.c
    cms/cms_menu_imu.h
    cms/cms_menu_ledstrip.c
    cms/cms_menu_ledstrip.h
    cms/cms_menu_misc.c
    cms/cms_menu_misc.h
    cms/cms_menu_mixer_servo.c
    cms/cms_menu_mixer_servo.h
    cms/cms_menu_navigation.c
    cms/cms_menu_navigation.h
    cms/cms_menu_osd.c
    cms/cms_menu_osd.h
    cms/cms_menu_saveexit.c
    cms/cms_menu_saveexit.h
    cms/cms_menu_vtx.c
    cms/cms_menu_vtx.h

    io/rangefinder.h
    io/rangefinder_msp.c
    io/rangefinder_benewake.c
    io/opflow.h
    io/opflow_cxof.c
    io/opflow_msp.c
    io/dashboard.c
    io/dashboard.h
    io/displayport_frsky_osd.c
    io/displayport_frsky_osd.h
    io/displayport_max7456.c
    io/displayport_max7456.h
    io/displayport_msp.c
    io/displayport_msp.h
    io/displayport_oled.c
    io/displayport_oled.h
    io/displayport_srxl.c
    io/displayport_srxl.h
    io/displayport_hott.c
    io/displayport_hott.h
    io/flashfs.c
    io/flashfs.h
    io/gps.c
    io/gps.h
    io/gps_ublox.c
    io/gps_nmea.c
    io/gps_naza.c
    io/gps_msp.c
    io/gps_private.h
    io/ledstrip.c
    io/ledstrip.h
    io/osd.c
    io/osd.h
    io/osd_canvas.c
    io/osd_canvas.h
    io/osd_common.c
    io/osd_common.h
    io/osd_grid.c
    io/osd_grid.h
    io/osd_hud.c
    io/osd_hud.h
    io/smartport_master.c
    io/smartport_master.h
    io/vtx.c
    io/vtx.h
    io/vtx_string.c
    io/vtx_string.h
    io/vtx_smartaudio.c
    io/vtx_smartaudio.h
    io/vtx_tramp.c
    io/vtx_tramp.h
    io/vtx_ffpv24g.c
    io/vtx_ffpv24g.h
    io/vtx_control.c
    io/vtx_control.h

    navigation/navigation.c
    navigation/navigation.h
    navigation/navigation_fixedwing.c
    navigation/navigation_fw_launch.c
    navigation/navigation_geo.c
    navigation/navigation_multicopter.c
    navigation/navigation_pos_estimator.c
    navigation/navigation_pos_estimator_private.h
    navigation/navigation_pos_estimator_agl.c
    navigation/navigation_pos_estimator_flow.c
    navigation/navigation_private.h
    navigation/navigation_rover_boat.c

    sensors/barometer.c
    sensors/barometer.h
    sensors/pitotmeter.c
    sensors/pitotmeter.h
    sensors/rangefinder.c
    sensors/rangefinder.h
    sensors/opflow.c
    sensors/opflow.h

    telemetry/crsf.c
    telemetry/crsf.h
    telemetry/srxl.c
    telemetry/srxl.h
    telemetry/frsky.c
    telemetry/frsky.h
    telemetry/frsky_d.c
    telemetry/frsky_d.h
    telemetry/hott.c
    telemetry/hott.h
    telemetry/ibus_shared.c
    telemetry/ibus_shared.h
    telemetry/ibus.c
    telemetry/ibus.h
    telemetry/ltm.c
    telemetry/ltm.h
    telemetry/mavlink.c
    telemetry/mavlink.h
    telemetry/msp_shared.c
    telemetry/msp_shared.h
    telemetry/smartport.c
    telemetry/smartport.h
    telemetry/sim.c
    telemetry/sim.h
    telemetry/telemetry.c
    telemetry/telemetry.h
)

add_subdirectory(target)
